package com.xrui.hbaseview.actions;

/**
 * This class represents an executable delegate.
 */
public abstract class Action<R> {

    /**
     * Executes the action.
     *
     * @throws Exception Any error.
     */
    public abstract R run() throws Exception;

    /**
     * The method is called when the error occurred.
     *
     * @param ex The error.
     */
    @SuppressWarnings("NoopMethodInAbstractClass")
    public void onError(Exception ex) {

    }
}
